-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/fold delta's: only insert and delete effective inserts and deletions. #7
base: feature/consistency-with-credo
Are you sure you want to change the base?
Feature/fold delta's: only insert and delete effective inserts and deletions. #7
Conversation
…es per mu_call_id_trail
… query + broken delta messages)
TODO:
|
TODO:
|
Benchmark resultsBenchmarking this change is pretty challenging, because the use cases of mu-auth are very diverse. I tried a benchmark where a simple object is created with around 12 fields, then changed 2 properties in a similar fashion as mu-cl-resources: delete all properties, not only the changed properties and create all new properties. The only notable times the cache flushes delta's to the triplestore is either during a read query (all delta's have to be flushed to guarantee a correct read query) or just before a read query due to a timeout (set with QUAD_CHANGE_CACHE_TIMEOUT env variable). ResultsSingle entity manipulationFirst the flush to the triplestore is executed during a read query (worst case)
Next the flush is executed due to a timeout, so not during any read query (best case)
Multiple entity manipulationsThe previous section only covered the manipulation of a single entity, this is probably not representative. The big flush happens with the first read query. But there are many more read queries to bring down the average.
ConclusionIn all cases the expected median is lower when using the new implementation. To achieve this one read query takes considerably longer than normal. If the actual use case allows this, one can put the timeout duration pretty low, so executing the delta's happens when no request is open. Trivia
|
Analyse incoming quad changes for effective inserts and deletions.
An effective insert is a quad that would be inserted (is not yet present in the triplestore).
An effective deletion is a quad that would be deleted (is present in the triplestore).
Multiple quad change requests are folded together and flushed with the first select query or with a flush timeout.
With this change delta-notifier can also forward these effective changes in format "v0.0.2".
To determine what changes are effective or not one CONSTRUCT query is created as follows:
Currently the used VIRTUOSO instance returned an error when adding GRAPH information, although supported in sparql 1.1.
This created a problem. One triple can be present in one graph but not in another, to handle this edge case, the presence of these quads is determined with ASK queries.